<style type="text/css">
    .btn.btn-danger-o {
        background: transparent;
		color: #fff;
		border: 1px solid #fff;
    }
</style>
<div class="fui-page fui-page-current page-goods-list">
    <div class='fui-content' style="top:0;background:none;padding-bottom:0;background: {{main.syscolor || '#7c1cc9'}};">
		<div id="carousel-container" class="carousel slide}" data-role="carousel" data-param-auto="true" ng-if="pagedata.pluginset.hdps">
			<div class="carousel-inner" role="listbox">
				<div ng-repeat="nav in pagedata.pluginset.hdps" ng-class="{'item':1, 'active':$index==0}" >
					<a ng-click="access_json(nav.url)">
						<img ng-src="{{tomedia(nav.picurl) || '../core/resource/images/nopic.jpg'}}" style="display: block; width: 100%; height: 100%;">
					</a>
				</div>
			</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {width:0.2rem;height:0.2rem;border-radius: 0.2rem;}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;width:0.6rem;border-radius: 0.2rem;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 0.2rem; bottom: 0.2rem; ">
				<div class="fui-swipe-bullet" ng-repeat="nav in pagedata.pluginset.hdps" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
        <div style="padding:1.5rem;margin-top:0">
            <div class="top" style="margin-bottom:-1.3rem;z-index:108">
                <div class="c">
                    <img style="width:3rem;height:3rem;border-radius:100%" src="{{tomedia(pagedata.info.logo) || '../core/resource/images/no-wxapp.png'}}"  />
                </div>
            </div>
            <div class="fui-code" style="background: linear-gradient(#fdf5d8, #fcd7f7);border-radius: 0.5rem;padding-bottom:1rem">
                <div class="fui-line-title" style="padding-top:1.3rem">
                    <div class="bold">{{pagedata.info.name}}</div>
                    <a style="color:#999;font-size:0.7rem" href="tel:{{pagedata.info.mobile}}">防伪电话：{{pagedata.info.mobile}} <i class="icon icon-phone" style="font-size:0.6rem"></i></a>
                    <div style="color:#999;font-size:0.7rem" href="javascript:;" ng-click="pagedata.openLocation();">地址：{{pagedata.info.address}} <i class="icon icon-map" style="font-size:0.6rem"></i></div>
                </div>
				<div class="fui-cellone" style="padding:0.3rem 1rem;top:0;">
						 <div class="fui-cellone-info">
							<div class="search-input" style="height:1.6rem">
								<input type="text" placeholder="请输入防伪码" class="search" ng-model="pagedata.code" style="height:1.6rem;border: 0;text-align: left; color: #999; font-size:0.6rem;background:#fff;border-radius: 1rem;" />
							</div>
						 </div>
						 <div class="fui-cellone-remark noremark">
							<span style="margin-left:0.3rem;font-size: 0.75rem;" ng-click="access_json('jy_goodsfw/search//code='+pagedata.code)">查询</span>
						 </div>
				</div>
                <div class="fui-line-title" style="padding:0.3rem 1rem">
                    <div class="text text-danger" style="margin-bottom: -8px;color:#fff;line-height:1.5">
                        <span style="color:#999;font-size:13px">{{pagedata.info.content}}</span>
                    </div>
                </div>
            </div>
			 <div class="content-empty" style="margin-top:1.5rem;">
                    <a href="javascript:;" ng-click="pagedata.scancode()" class='btn btn-sm btn-danger-o external' style="border-radius: 100px;width:  9rem;font-size: .75rem">
                        <i class="icon icon-saoyisao1" style="font-size:0.75rem;"></i>
                        请点击扫码，查防伪！
                    </a>
             </div>
        </div>
		<div ng-include="sys_html('common/_copyright',true)"></div>
    </div>
</div>
<div class="fe-mod-9" style="height:7rem;min-height:6rem">
    <img style="height:6rem" ng-src="{{tomedia(pagedata.hdps.picurl) || '../core/resource/images/nopic.jpg'}}">
</div>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
</script>
<script language="javascript">
scope.pagedata.scancode=function () {
			console.log('scanQRCodeOK');
			wx.scanQRCode({
				needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
				scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
				success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					var start = result.indexOf(',');
					result = result.substr(start+1);
					if(result.indexOf("http") != -1){
                        var url=result;
                    }else{
                        var url=scope.pagedata.url+"&code="+result
                    }
					location.href = url;
				}
			});
}
scope.pagedata.openLocation=function(item){
    wx.openLocation({
        latitude: '', // 纬度，浮点数，范围为90 ~ -90
        longitude:'', // 经度，浮点数，范围为180 ~ -180。
        name: scope.pagedata.info.name, // 位置名
        address: scope.pagedata.info.address, // 地址详情说明
        scale: 20, // 地图缩放级别,整形值,范围从1~28。默认为最大
        infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
        success:function(){
            //alert(1111);
        }
    });
}
</script> 